package com.usian.text;

import com.usian.App;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@SpringBootTest(classes = {App.class})
@RunWith(SpringJUnit4ClassRunner.class)
public class ListenerText {
    @Autowired
    AmqpTemplate amqpTemplate;
    @Test
    public void listenerTest(){
        String msg = "hello, Spring boot amqp";
        amqpTemplate.convertAndSend("exchange","a.b",msg);
    }
}
